package org.dlsu.mt.parser;

import java.util.HashSet;

/**
 * FStructureInterface is an interface that provides methods for complex structures inside an FStructure.
 * This interface provides the means of merging and generating the XML output of the FStructure.
 */
public interface FStructureInterface {
	/**
	 * Returns the String representation of the object.
	 *
	 * @return The string representation of the object
	 */
	public String toString();

	/**
	 * Returns the XML representation of the object.
	 *
	 * @return The XML representation of the object
	 */
	public String toXML();

	/**
	 * Checks whether the two structures are equal
	 *
	 * @param obj The FStructureInterface to compare
	 * @return True if equal, otherwise false
	 */
	public boolean equals(Object obj);

	/**
	 * Merges the FStructureInterface with another one
	 *
	 * @param f The FStructure to merge with
	 * @return True if merge is successful, false if otherwise
	 */
	public boolean merge(FStructureInterface f);

	/**
	 * Gets the name of the FStructureInterface
	 *
	 * @return The name of the FStructure
	 */
	public String getName();

	/** Set a name for the FStructureInterface
	 *
	 * @param name The new name for the FStructure
	 */

	/**
	 * Gets the list of feature-value pairs of the FStructureInterface.
	 * @return The feature-value pairs of the FStructureInterface as an array of Strings: <feature_name> = <feature_value>
	 */
	public String[] getFeatures();

	/**
	 * Gets the list of feature-value pairs of the FStructureInterface.
	 * @return The feature-value pairs of the FStructureInterface as a HashSet: <feature_name>\t<feature_value>
	 */
	public HashSet getFeaturesAlias();
	/**
	 * Adds a feature to the FStructureInterface.
	 */
	public void addElement(FStructureElementValue value);

	public void setName(String name);

	/**
	 * Creates a copy of the current FStructureInterface neccessary in parsing and generating the final FStructure output.
	 *
	 * @return A copy of the current object
	 */
	public Object clone();
}